Gives the screen’s backdrop (the color behind everything) a sky of your own colors: top is the color of the first row of the screen, middle the color halfway down and bottom the color of the last row, with a smooth blend in between. Use color literals like #1F3A7C. It stands still. Turn it off with screen_backdrop(BACKDROP_NONE, 0, 0).
Works differently on Game Boy - The Game Boy has no colors, so the backdrop becomes bands of its 4 shades (at most 8, each at least 18 rows tall) in the shade the picture leaves for the sky (its color number 0); the sky has to be named in the call.
Works differently on Game Boy Color - The Game Boy Color colors the backdrop row by row in the picture's color 0, so the sky shows only where the picture uses it; only one row-by-row color runs at a time (this, a sprite color or an overlay's Sky color), and the sky is named in the call.
On other consoles this differs: see Side by side and How the consoles differ.
screen_backdrop_gradient(top, middle, bottom)| Name | Type |
|---|---|
top | color |
middle | color |
bottom | color |
Nothing.
Gives the screen's backdrop a sky made of your own colors. You pick three: the color of the first row at the top of the screen, the color of the row halfway down, and the color of the last row at the bottom. The console blends smoothly from one to the next, so the sky changes a little on every row.


The first example below, screen_backdrop_gradient(#0B1330, #7A3A6A, #FFB060);, half a second after the room started. The lighthouse and the ground are drawn on top, so they hide the sky; the sky shows everywhere nothing else is drawn. A real picture from a Game Boy Advance ROM.
The backdrop is the color the console fills the screen with before it draws anything else. It shows wherever no background and no sprite covers it, so a floor, a wall or a picture drawn over it hides it. It is for rooms with open sky.
You give it three things, in this order:
top - the color of the first row of the screen.middle - the color of the row halfway down.bottom - the color of the last row of the screen.Write each one as a color literal: a # and then six hex digits, like #1F3A7C. The first two digits are how much red, the next two how much green and the last two how much blue, the same codes web pages use. Any paint program's color picker will tell you the code of a color you like.
The backdrop is not one of the console's palette colors, so you are not limited to the colors your pictures already use. Pick anything.
There is one thing to know. The console keeps only 32 steps of each of red, green and blue, not 256, so it uses the top five bits of each pair of digits and ignores the rest. #1F3A7C and #1F3A7F come out as exactly the same color, and two colors that are only a little different may look the same on the screen. If a gradient looks stripy, that is the 32 steps: a sky that runs between two quite different colors shows about 30 distinct bands at most.
If the same sky is used in more than one place, give it a name. The Build sky gradient button in the Overlay Effects tab's Sky color section picks the three colors for you, with a color wheel or from the colors your pictures already use, and writes them as one named value, like SKY_DUSK. Then write the name where the three colors go: screen_backdrop_gradient(SKY_DUSK);. It does exactly what writing the three colors out would do, and you can change the sky in one place. A name that does not hold exactly three colors is refused, and says so. See The Macros section and skies.
A sky made from three colors does not slide. The three colors are exactly what is on the screen. (The named skies, like BACKDROP_SUNSET, are drawn twice as tall as the screen and slide down and back; that is something their artists drew in on purpose, with five colors each.)
To change the sky, call it again with different colors and the picture changes at once. Calling it again with the same three colors does nothing, so it is safe to call from a Step event, though calling it once when the room starts is tidier.
screen_backdropThe screen has one backdrop, so a gradient and a named sky from screen_backdrop replace each other: whichever you asked for last is the one you see. Neither can be shown together with the other, and there is nothing to remember or to lose.
screen_backdrop(BACKDROP_NONE, 0, 0);The same call that turns a named sky off turns a gradient off. It gives the slot back straight away and the screen returns to the color you chose for the room. When a room is loaded - you change room, or restart the one you are in - the sky ends by itself, so a new room that wants one asks for its own.
Always destroy it, do not hide it. There is no way to hide a sky, on purpose: something hidden would look gone but would still use up one of the console's few row-by-row slots.
A gradient uses one of the 8 row-by-row effects the console has (the same one a named sky would use, not an extra one), and no matrix, no sprite and no palette slot. A room change keeps two of the eight for itself, so six are left for you, shared with draw_sprite_ripple, draw_text_3d and the named skies. The debug screen's H-BLANK line shows how many are in use.
The 160 rows are worked out when you call it, which takes about a tenth of a frame, and are kept in 640 bytes of memory that every sky shares. Asking again with the same colors costs almost nothing; asking with different colors works the rows out again.
If there is no room for another row-by-row effect, a development build stops with a message that names everything holding one; a release build shows no sky. It never half-works.
screen_backdrop_gradient(#0B1330, #7A3A6A, #FFB060);A dusk sky: deep blue at the top, plum in the middle and warm orange at the bottom. Call it once, for example when the room starts.
if (btn_pressed(BTN_A)) {
screen_backdrop_gradient(#103070, #50A0E0, #FFFFFF);
}
if (btn_pressed(BTN_B)) {
screen_backdrop_gradient(#000010, #101040, #302060);
}Press A for a clear day, press B for night. Each press swaps the sky at once.
To go back to the plain screen, use screen_backdrop(BACKDROP_NONE, 0, 0) as shown above.
Shares the one row-by-row (H-Blank) effect the screen’s backdrop uses, so it costs ONE of the console’s 8 for as long as it is on, shared with screen_backdrop: asking for either replaces the other, and turning it off with BACKDROP_NONE hands the slot back at once (destroy it, do not hide it). It costs no palette slot, because the backdrop is not a palette entry, so any color at all is allowed. The 160 rows are worked out when you call it and kept in 640 bytes of memory that every sky shares; calling it again with the same three colors does nothing, and calling it with different ones works the 160 rows out again (about a tenth of a frame) and changes the picture at once. The console has 5 bits for each of red, green and blue, so it keeps the top five bits of each byte of a color literal: #1F3A7C and #1F3A7F are the same color. A room change ends it, exactly as it ends screen_backdrop. If there is no room for another row-by-row effect, a development build stops with a message that names every look holding a slot; a release build draws nothing.